import { IComment } from '@/interface';
import { $get, $post, $put, $delete } from '@/request/api';

export function fetchCommentList(params) {
  return $get('/comment/list',params);
}

export function fetchCreateComment(data: IComment) {
  return $post('/comment/create',data);
}
export function fetchUpdateComment(data: IComment) {
  return $put(`/comment/update/${data.id}`,data);
}
export function fetchDeleteComment(id: number) {
  return $delete(`/comment/delete/${id}`);
}
